<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="java.util.*,
com.brother.model.*,com.brother.service.*,
com.brother.realtime.*,com.brother.realtime.cache.*,com.brother.database.*" %><%
    String action = request.getParameter("action");
    String trackerId = request.getParameter("trackerId");
    
	TrackerService tks =new TrackerService();
	AlarmService als = new AlarmService();
	
	boolean  status = ParametersSetCache.getInstance().isSuccess(trackerId);
	String text = ParametersSetCache.getInstance().getText(trackerId);
	

	if(action != null){
		if(action.equalsIgnoreCase("reportInterval")){
			out.print(tks.getIntervalSetStatus(trackerId));
		}else if(action.equalsIgnoreCase("geofenceAdd")){
			out.print(status);
			if(status)
				ParametersSetCache.getInstance().removeAction(trackerId);
		}else if(action.equalsIgnoreCase("speed")){
			out.print(status);
			if(status)
				ParametersSetCache.getInstance().removeAction(trackerId);
		}else if(action.equalsIgnoreCase("engine")){
			out.print(status);
			if(status)
				ParametersSetCache.getInstance().removeAction(trackerId);

		}else if(action.equalsIgnoreCase("reqStatus")){
			if(status){
				out.print(text);
				ParametersSetCache.getInstance().removeAction(trackerId);
			}else{
				out.print("");
			}
		}else if(action.equalsIgnoreCase("reqTrackerVersion")){
			if(status){
				out.print(text);
				ParametersSetCache.getInstance().removeAction(trackerId);
			}else{
				out.print("");
			}
		}else if(action.equalsIgnoreCase("transferFirmare")){
			if(status){
				out.print(text);
				ParametersSetCache.getInstance().removeAction(trackerId);
			}else{
				out.print(text);
			}
		}else{
			out.print(status);
			if(status)
				ParametersSetCache.getInstance().removeAction(trackerId);
		}
		
	}else{
		out.print("error");
	}
    DataBase.closeThreadConnection();
    %>